
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemNoticeRequest struct {

	Title string `json:"title" form:"title"`

	Type string `json:"type" form:"type"`

	Icon string `json:"icon" form:"icon"`

	Url string `json:"url" form:"url"`

	TableTitle string `json:"table_title" form:"table_title"`

	Template string `json:"template" form:"template"`

	PushAdmin string `json:"push_admin" form:"push_admin"`

	Status string `json:"status" form:"status"`

}

func (r *SystemNoticeRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemNoticeRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"title": "required",

		"type": "required",

		"icon": "required",

		"url": "required",

		"table_title": "required",

		"template": "required",

		"push_admin": "required",

		"status": "required",

	}
}

func (r *SystemNoticeRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemNoticeRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemNoticeRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
